package commands.controller;

/**
 * Request to save sending preferences
 * @author Marcin Kamionowski
 */
public class CC_GUISetPreferences extends ControllerCommand {

    private final int maxActiveDownloads;
    private final int connectionsPerDownload;

    /**
     * Constructor
     * @param maxActiveDownloads Maximum number of active downloads
     */
    public CC_GUISetPreferences(int maxActiveDownloads, int connectionPerDownload) {
        super(ControllerCommandType.GUI_SET_PREFERENCES);
        this.maxActiveDownloads = maxActiveDownloads;
        this.connectionsPerDownload = connectionPerDownload;
    }

    /**
     * Getter
     * @return Maximum number of active downloads
     */
    public int getMaxActiveDownloads() {
        return maxActiveDownloads;
    }

    public int getConnectionsPerDownload() {
        return connectionsPerDownload;
    }

    

    @Override
    public String toString() {
        StringBuilder toStringBuilder = new StringBuilder();
        toStringBuilder.append(super.toString());
        toStringBuilder.append("\n");
        toStringBuilder.append("\nmaxActiveDownloads: ");
        toStringBuilder.append(maxActiveDownloads);
        return toStringBuilder.toString();
    }
}
